#ifndef DATABASE_CONNECTION_H
#define DATABASE_CONNECTION_H

#include <QObject>

#include <QSqlDatabase>

class Project;

class DatabaseConnection: public QObject
{
  Q_OBJECT
    public:
  DatabaseConnection(QObject* p);
  virtual ~DatabaseConnection();

  bool open(Project* p, const QString& fileName);
  bool save(Project* p);
  void close();
  void execDDL(QStringList l);

 private:
  bool loadProject(Project* p);
  QSqlDatabase _db;
};

#endif
